package com.taxigang.client.uibinder;

import com.google.gwt.user.client.Command;
import com.taxigang.client.Session;
import com.taxigang.client.ui.map.ProcessingDialog;
import com.taxigang.client.uibinder_mobile.AlertOkCancelMobile;

public class Alert{

	public static void alert(final Command cmd,String title, String text, boolean showCancel,String width){
		ProcessingDialog.hide();

		if (Session.getInstance().getIsUserAgentMobile()){
			AlertOkCancelMobile alert = new AlertOkCancelMobile(cmd,title,text,showCancel);
			alert.show();
		} else {
			AlertOkCancel alert = new AlertOkCancel(cmd,title,text,showCancel,width);
			alert.show();
		}

	}
	public static void promotion(final Command cmd,String title, String[] text, boolean showCancel,String width){
		ProcessingDialog.hide();

		Promotion alert = new Promotion(cmd,title,text,showCancel,width);
		alert.show();

	}
}
